<template>
  <div class="tac">
    <el-card shadow="never" class="userInfo">
      <el-row>
        <el-col :span="8">
          <div>
            <el-image style="width:100%; height: 100px" :src="$fullUrl($banseUrl, UserInfo.avatar)" fit="fill"/>
          </div>
        </el-col>
        <el-col :span="16">
          <p class="text item">
            用户名:{{ UserInfo.nickname || UserInfo.username }}
          </p>
          <p class="text item sign_out" @click="sign_out_fun">退出</p>
        </el-col>
      </el-row>
    </el-card>
    <el-scrollbar :max-height="screenHeight + 'px'">
      <el-menu :default-active="activeIndex" mode="vertical" @select="handleSelect" class="side el-menu-vertical-demo"
               @open="handleOpen" @close="handleClose" background-color="#545c64" text-color="#fff"
               active-text-color="#38f">
        <el-menu-item index="/home/index" @click="handleButtonClick(0)">
          <template #title>
            <el-icon><location/></el-icon>
            <span>数据分析</span>
          </template>
        </el-menu-item>

        <el-sub-menu class="left-menu-top" index="/home/user"
                     v-show="user_group == '管理员' || $check_group(['/user/table','/user_group/table'
                                                                                 ,'/registered_user/table'
                                                                                                          ,'/merchant_users/table'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ])">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate8">角色管理</span></template>
          <el-sub-menu index="1-1" class="left-menu-sub">
            <template #title>管理员</template>
            <el-menu-item class="left-menu-child" index="/home/user/table" v-show="user_group == '管理员'"
                          @click="handleButtonClick(8)"><span>管理员列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/user/view" v-show="user_group == '管理员'"
                          @click="handleButtonClick(8)"><span>管理员添加</span></el-menu-item>
          </el-sub-menu>
                                    <el-sub-menu index="1-2" class="left-menu-sub">
                <template #title>注册用户</template>
                <el-menu-item class="left-menu-child" index="/home/registered_user/table"
                              v-show="$check_action('/registered_user/table')" @click="handleButtonClick(8)"><span>注册用户列表</span></el-menu-item>
                <el-menu-item class="left-menu-child" index="/home/registered_user/view" v-if="$check_action('/registered_user/table', 'add')" @click="handleButtonClick(8)"><span>注册用户添加</span></el-menu-item>
              </el-sub-menu>
                                                <el-sub-menu index="1-3" class="left-menu-sub">
                <template #title>商家用户</template>
                <el-menu-item class="left-menu-child" index="/home/merchant_users/table"
                              v-show="$check_action('/merchant_users/table')" @click="handleButtonClick(8)"><span>商家用户列表</span></el-menu-item>
                <el-menu-item class="left-menu-child" index="/home/merchant_users/view" v-if="$check_action('/merchant_users/table', 'add')" @click="handleButtonClick(8)"><span>商家用户添加</span></el-menu-item>
              </el-sub-menu>
                                                                                                                                                                                                                                    </el-sub-menu>

        <el-sub-menu class="Cust left-menu-top" :index="'/home' + index" v-for="(i, index) in auth" :key="i.auth_id" v-show="$check_action(i.path)">
          <template #title>
            <el-icon><location/></el-icon>
			<span v-if="!i.children.length">{{ i.mod_name + "管理" }}</span>
			<span v-else>{{ i.mod_name }}</span>
		  </template>
		  <div v-if="!i.children.length">
			<el-menu-item class="left-menu-child" menu-trigger :index="'/home' + i.path" :class="{ active: route.path === i.path }"
			              @click="handleButtonClick(` ${i.mod_name}管理`)"><span>{{ i.page_title + "列表" }}</span>
			</el-menu-item>
			<el-menu-item class="left-menu-child" v-if=" i.has_add && ($check_action(i.path.replace(/(.*)table/, '$1view'), 'add'))"
			              :index="'/home' + i.path.replace(/(.*)table/, '$1view')" :class="{ sactive: route.path === i.path }"
			              @click="handleButtonClick(` ${i.mod_name}管理`)">
			  <span> {{ i.page_title + "添加" }}</span>
			</el-menu-item>
		  </div>
          <div v-else>
            <el-sub-menu class="Cust left-menu-sub" :index="'child'+ item.id" v-for="(item) in i.children" :key="item.id" v-show="$check_action(item.path)">
              <template #title>{{ item.mod_name + "管理" }}</template>
              <div>
                <el-menu-item class="left-menu-child" menu-trigger :index="'/home' + item.path" :class="{ active: $route.path === item.path }" @click="handleButtonClick(`${item.mod_name}管理`)">
                  <span>{{ item.page_title + "列表" }}</span>
                </el-menu-item>
                <el-menu-item class="left-menu-child" v-if="item.has_add && $check_action(item.path.replace(/(.*)table/, '$1view'), 'add')" :index="'/home' + item.path.replace(/(.*)table/, '$1view')" :class="{ sactive: $route.path === item.path }" @click="handleButtonClick(` ${item.mod_name}管理`)">
                  <span>{{ item.page_title + "添加" }}</span>
                </el-menu-item>
              </div>
            </el-sub-menu>
          </div>
        </el-sub-menu>

        <el-sub-menu class="left-menu-top" index="web"
                     v-show="user_group == '管理员' || $check_group(['/nav/table','/link/table','/slides/table','/ad/table','/sensitive_vocabulary/table'])">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate1">系统管理</span></template>
            <el-sub-menu class="left-menu-sub" index="web-1" v-show="user_group == '管理员' || $check_action('/link/table')">
            <template #title>友情链接</template>
            <el-menu-item class="left-menu-child" index="/home/link/table" @click="handleButtonClick(1)"><span>友情链接列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/link/view" @click="handleButtonClick(1)"
                          v-show="user_group == '管理员' || $check_action('/link/view')"><span>友情链接添加</span></el-menu-item>
          </el-sub-menu>
            <el-sub-menu class="left-menu-sub" index="web-2" v-show="user_group == '管理员' || $check_action('/slides/table')">
            <template #title>轮播图管理</template>
            <el-menu-item class="left-menu-child" index="/home/slides/table" @click="handleButtonClick(1)"><span>轮播图列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/slides/view" @click="handleButtonClick(1)"
                          v-show="user_group == '管理员' || $check_action('/slides/view')"><span>轮播图添加</span>
            </el-menu-item>
          </el-sub-menu>
            <el-sub-menu class="left-menu-sub" index="web-3" v-show="user_group == '管理员' || $check_action('/ad/table')">
            <template #title>广告管理</template>
            <el-menu-item class="left-menu-child" index="/home/ad/table" @click="handleButtonClick(1)"><span>广告列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/ad/view" @click="handleButtonClick(1)"
                          v-show="user_group == '管理员' || $check_action('/ad/view')"><span>广告添加</span></el-menu-item>
          </el-sub-menu>
              <el-sub-menu class="left-menu-sub" index="web-4" v-show="user_group == '管理员' || $check_action('/sensitive_vocabulary/table')">
            <template #title>敏感词管理</template>
            <el-menu-item class="left-menu-child" index="/home/sensitive_vocabulary/table"
                          @click="handleButtonClick(1)"><span>敏感词列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/sensitive_vocabulary/view"
                          v-show="user_group == '管理员' || $check_action('/sensitive_vocabulary/view')"
                          @click="handleButtonClick(1)"><span>敏感词添加</span></el-menu-item>
          </el-sub-menu>
          </el-sub-menu>

        <el-sub-menu class="left-menu-top" index="webs" v-show="$check_action('/message/table')">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate8">留言管理</span></template>
          <el-menu-item class="left-menu-child" v-show="$check_action('/message/table')" index="/home/message/table" @click="handleButtonClick(8)">
            <span>在线留言列表</span>
          </el-menu-item>
        </el-sub-menu>

        <el-sub-menu class="left-menu-top" index="notic" v-show="$check_group(['/notice/table'])">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate2">网站公告管理</span>
          </template>
          <el-menu-item class="left-menu-child" v-show="$check_action('/notice/table')" index="/home/notice/table" @click="handleButtonClick(2)">
            <span>网站公告列表</span>
          </el-menu-item>
          <el-menu-item class="left-menu-child" v-show="$check_action('/notice/view')" index="/home/notice/view"  @click="handleButtonClick(2)">
            <span>网站公告添加</span>
          </el-menu-item>
        </el-sub-menu>
        <el-sub-menu class="left-menu-top" index="news" v-show="$check_group(['/article/table','/article_type/table'])">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate3">新闻管理</span></template>
          <el-sub-menu class="left-menu-sub" index="3-1" v-show="$check_action('/article/table')">
            <template #title>{{ $page_title("/article/table") || "新闻信息管理" }}</template>
            <el-menu-item class="left-menu-child" index="/home/article/table" @click="handleButtonClick(3)"><span>{{
                $page_title("/article/table") || "新闻信息" }}列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/article/view" @click="handleButtonClick(3)"
                          v-if="$check_action('/article/view')"><span>{{
                $page_title("/article/table") || "新闻信息" }}添加</span></el-menu-item>
          </el-sub-menu>
          <el-sub-menu class="left-menu-sub" index="3-2" v-show="$check_action('/article_type/table')">
            <template #title>{{ $page_title("/article_type/table") || "新闻类型管理" }}</template>
            <el-menu-item class="left-menu-child" index="/home/article_type/table" @click="handleButtonClick(3)"><span>{{
                $page_title("/article_type/table") || "新闻信息" }}列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/article_type/view" @click="handleButtonClick(3)"><span>{{
                $page_title("/article_type/table") || "新闻信息" }}添加</span></el-menu-item>
          </el-sub-menu>
        </el-sub-menu>
        <el-sub-menu class="left-menu-top" index="subject" v-show="$check_group([
              '/subject/table',
            '/exam_question_database/table',
            '/user_answer_wrong/table',
            '/subject_exam/table',
                '/exam/table'
              ])
            ">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate5">考试管理</span></template>
            <el-sub-menu class="left-menu-sub" index="subject-1" v-show="$check_action('/exam/table')">
            <template #title>在线考试</template>
            <el-menu-item index="/home/exam/table" @click="handleButtonClick(5)"><span>知识问答列表</span></el-menu-item>
            <el-menu-item index="/home/exam/view" @click="handleButtonClick(5)"
                          v-if="user_group == '管理员' || $check_action('/exam/table', 'add')"><span>知识问答添加</span>
            </el-menu-item>
          </el-sub-menu>
              <el-sub-menu class="left-menu-sub" index="subject-2" v-show="$check_action('/subject/table')">
            <template #title>科目列表</template>
            <el-menu-item class="left-menu-child" index="/home/exam_subject/table"
                          @click="handleButtonClick(5)"><span>科目列表列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/exam_subject/view"
                          v-if="$check_action('/subject/table', 'add')"
                          @click="handleButtonClick(5)"><span>科目列表添加</span></el-menu-item>
          </el-sub-menu>
          <el-sub-menu class="left-menu-sub" index="subject-3" v-show="$check_action('/exam_question_database/table')">
            <template #title>试题库</template>
            <el-menu-item class="left-menu-child" index="/home/exam_subject/question_database_table"
                          @click="handleButtonClick(5)"><span>试题库列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/exam_subject/question_database_view"
                          v-if="$check_action('/exam_question_database/table', 'add')"
                          @click="handleButtonClick(5)"><span>试题库添加</span></el-menu-item>
          </el-sub-menu>
          <el-sub-menu class="left-menu-sub" index="subject-4" v-show="$check_action('/subject_exam/table')">
            <template #title>试卷列表</template>
            <el-menu-item class="left-menu-child" index="/home/exam_subject/exams_table"
                          @click="handleButtonClick(5)"><span>试卷列表列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/exam_subject/exams_view"
                          v-if="$check_action('/subject_exam/table', 'add')"
                          @click="handleButtonClick(5)"><span>试卷列表添加</span></el-menu-item>
          </el-sub-menu>
          <el-menu-item class="left-menu-child" v-show="$check_action('/user_answer_wrong/table')"
                        index="/home/exam_subject/wrong_list" @click="handleButtonClick(5)"><span>错题记录</span>
          </el-menu-item>
          </el-sub-menu>
        <el-sub-menu class="left-menu-top" index="forum" v-show="$check_group(['/forum/table', '/forum_type/table'])">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate6">交流管理</span>
          </template>
          <el-sub-menu class="left-menu-sub" index="forum-1" v-show="$check_action('/forum/table')">
            <template #title>{{ $page_title("/forum/table") || "论坛" }}</template>
            <el-menu-item class="left-menu-child" index="/home/forum/table" @click="handleButtonClick(6)"><span>{{
                $page_title("/forum/table") || "论坛" }}列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/forum/view" v-if="$check_action('/forum/view')"
                          @click="handleButtonClick(6)"><span>{{ $page_title("/forum/table") ||
                "论坛" }}添加</span></el-menu-item>
          </el-sub-menu>
          <el-sub-menu class="left-menu-sub" index="forum-2" v-show="$check_action('/forum_type/table')">
            <template #title>{{ $page_title("/forum_type/table") || "论坛分类" }}</template>
            <el-menu-item class="left-menu-child" index="/home/forum_type/table"
                          @click="handleButtonClick(1)"><span>{{ $page_title("/forum_type/table") || "论坛" }}列表</span>
            </el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/forum_type/view"
                          v-if="$check_action('/forum_type/view', 'add')"
                          @click="handleButtonClick(6)"><span>{{
                $page_title("/forum_type/table") || "论坛分类" }}添加</span></el-menu-item>
          </el-sub-menu>

        </el-sub-menu>
        <el-sub-menu class="left-menu-top" index="mall" v-show="$check_group(['/goods/table','/order/table'
                                                                                      ,'/fresh_products/table'
                                                                                                                                                                                                                                  ,'/logistics_delivery/table'
          ])">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate7">商城管理</span></template>
                                                                                <el-sub-menu class="left-menu-sub" index="mall-1" v-show="$check_action('/fresh_products/table')">
                <template #title>生鲜商品</template>
                <el-menu-item class="left-menu-child" index="/home/fresh_products/table"
                              @click="handleButtonClick(7)"><span>生鲜商品列表</span></el-menu-item>
                <el-menu-item class="left-menu-child" index="/home/fresh_products/view"
                              v-if="$check_action('/fresh_products/table','add') || $check_action('/fresh_products/view','add')"
                              @click="handleButtonClick(7)"><span>生鲜商品添加</span></el-menu-item>
              </el-sub-menu>
                                                                                                                                                                                                                <el-sub-menu class="left-menu-sub" index="mall-2" v-show="user_group == '管理员' || $check_action('/goods_type/table')">
            <template #title>{{$page_title("/goods_type/table") || "分类列表"}}</template>
            <el-menu-item class="left-menu-child" index="/home/goods_type/table" @click="handleButtonClick(7)">
              <span>{{$page_title("/goods_type/table") || "分类列表"}}列表</span>
            </el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/goods_type/view" @click="handleButtonClick(7)">
              <span> {{$page_title("/goods_type/table") || "分类列表"}}添加</span>
            </el-menu-item>
          </el-sub-menu>
            <el-sub-menu class="left-menu-sub" index="mall-3" v-show="$check_action('/goods/table')">
            <template #title>优惠券</template>
            <el-menu-item class="left-menu-child" index="/home/coupon/table" @click="handleButtonClick(7)"><span>优惠券列表</span></el-menu-item>
            <el-menu-item class="left-menu-child" index="/home/coupon/view" v-if="$check_option('/goods/table', 'seller')" @click="handleButtonClick(7)">
              <span>优惠券添加</span>
            </el-menu-item>
          </el-sub-menu>
                <el-sub-menu class="left-menu-sub" index="mall-4" v-show="user_group == '管理员'">
              <template #title>会员等级</template>
              <el-menu-item class="left-menu-child" index="/home/vip_level/table" @click="handleButtonClick(7)"><span>会员等级列表</span></el-menu-item>
              <el-menu-item class="left-menu-child" index="/home/vip_level/view" @click="handleButtonClick(7)"><span>会员等级添加</span></el-menu-item>
            </el-sub-menu>
              <el-menu-item v-show="$check_action('/order/table')" index="/home/order/table"
                          class="bg-hover left-menu-child" @click="handleButtonClick(7)">
              <span>{{$page_title("/order/table") || "订单"}}</span>
            </el-menu-item>
            <el-menu-item v-show="$check_action('/logistics_delivery/table')" index="/home/logistics_delivery/table" class="bg-hover left-menu-child"
                        @click="handleButtonClick(7)"><span>订单配送</span>
          </el-menu-item>
        </el-sub-menu>
        <el-sub-menu class="left-menu-top" index="auth" v-show="user_group == '管理员'">
          <template #title>
            <el-icon><location/></el-icon>
            <span ref="customTemplate9">权限管理</span></template>
          <el-menu-item class="left-menu-child" index="/home/auth/table" v-show="user_group == '管理员'"
                        @click="handleButtonClick(9)"><span>权限列表</span>
          </el-menu-item>
        </el-sub-menu>
        <el-sub-menu class="left-menu-top" index="customTemplate10" v-show="user_group == '管理员'">
          <template #title>
            <el-icon>
              <location/>
            </el-icon>
            <span ref="customTemplate10">iframe模块</span></template>
            <el-menu-item class="left-menu-child" index="/home/iframe/recognition_type" @click="handleButtonClick(10)"><span>智能识别系统</span></el-menu-item>
              <el-menu-item class="left-menu-child" index="/home/iframe/translate" @click="handleButtonClick(10)"><span>在线智能翻译</span></el-menu-item>
              <el-menu-item class="left-menu-child" index="/home/iframe/iframe" @click="handleButtonClick(10)"><span>天气预报</span></el-menu-item>
          </el-sub-menu>
      </el-menu>
    </el-scrollbar>
  </div>
</template>

<script setup>
  import {
    Document,
    Menu as IconMenu,
    Location,
  } from "@element-plus/icons-vue"
  import { useRouter,useRoute,} from "vue-router"
  import moment from 'moment'
  import { $post, $get } from "@/api/Api.js"
  import {
      $check_group,
      $fullUrl,
      $banseUrl,
      $check_action,
      $page_title,
  } from "@/utils/utils.js";
  import storageHelper from "@/libs/StorageHelper";
  import { useStore } from "vuex";
  import {
    ref,
    computed,
    onMounted,
    onUpdated,
  } from "vue";
  let store = useStore();
  let router = useRouter();
  let route = useRoute();
  let user_group = storageHelper.getGroupValue();
  let UserInfo = storageHelper.getUserInfo();
  let activeIndex = ref("");
  let screenHeight = document.body.clientHeight - 100;
  // 退出登录
  let sign_out_fun = () => {
    $get("/api/user/quit").then((res) => {
      store.commit("web/set_auth", []);
      sessionStorage.clear();
      localStorage.clear();
      router.replace("/");
    });
  };
  let handleSelect = (key, keyPath) => {
    router.push(key);
  };

  let customTemplate1 = ref(null);
  let customTemplate2 = ref(null);
  let customTemplate3 = ref(null);
  let customTemplate4 = ref(null);
  let customTemplate5 = ref(null);
  let customTemplate6 = ref(null);
  let customTemplate7 = ref(null);
  let customTemplate8 = ref(null);
  let customTemplate9 = ref(null);
  let customTemplate10 = ref(null);
  let handleOpen = (key, keyPath) => {
    // console.log(key, keyPath);
  };

  let handleClose = (key, keyPath) => {
    // console.log(key, keyPath);
  };
  let text = ref("");
  let handleButtonClick = (buttonId) => {
    let lis_title;
    const templateRefs = [
      null, // 索引 0 不使用
      customTemplate1,
      customTemplate2,
      customTemplate3,
      customTemplate4,
      customTemplate5,
      customTemplate6,
      customTemplate7,
      customTemplate8,
      customTemplate9,
      customTemplate10,
    ];

    if (buttonId >= 1 && buttonId <= templateRefs.length) {
      lis_title = templateRefs[buttonId];
      sessionStorage.setItem("title-text", buttonId.toString());
    } else {
      sessionStorage.setItem("title-text", buttonId);
    }
    if (lis_title) {
      text.value = lis_title._value.innerText;
      sessionStorage.setItem("title-text", text.value);
    } else {
      if (buttonId.length >= 1) {
        text.value = buttonId
        sessionStorage.setItem("title-text", text.value);
      } else {
        text.value = '数据分析'
        sessionStorage.setItem("title-text", '数据分析');
      }

    }
    const stamp = new Date()
    let logs = moment(stamp).format('YYYY-MM-DD HH:mm:ss')
    let mode_names = JSON.parse(localStorage.getItem('log_msg'))
    console.log(mode_names)
    if (!mode_names) {
      mode_names = []
    }
    // 操作日志 存入展示数组
    if (text.value !== '') {
      mode_names.push({
        name: user_group,
        title: text.value,
        time: logs,
      })
      mode_names.sort((a, b) => b.time.localeCompare(a.time));
      if (mode_names.length > 20) {
        mode_names.pop();
      }
      //本地储存
      localStorage.setItem('log_msg', JSON.stringify(mode_names))
    }
  };

  onMounted(() => {
  });
  const auth = computed(() => {
    let tables = JSON.parse(window.localStorage.getItem("set_auth"));
    let lt = [];
    let site_list = [];
                site_list.push("i_want_to_customize_it")
                let list = [
      "exam",
      "article",
      "article_type",
      "comment",
      "goods",
      "order",
        "logistics_delivery",
        "forum",
      "forum_type",
      "notice",
      "message",
      "subject",
      "exam_question_database",
      "subject_exam",
      "user_answer_wrong",
    ];
                        list.push("fresh_products");
                                                            list.push("registered_user");
        list.push("merchant_users");
                        for (let i = 0; i < tables.length; i++) {
      let o = tables[i];
      if (o.path.indexOf("/table") !== -1) {
        if (list.indexOf(o.table_name) === -1) {
          o.has_add = site_list.indexOf(o.table_name) === -1;
          lt.push(o);
        }
      }
    }
	
	let lt2 = [];
	for (let i = 0; i < lt.length; i++) {
	  let o = lt[i];
	  let id = `${o.parent}-${o.mod_name}-${o.auth_id}-${i}`
	  if (!o.parent) {
	    lt2.push({ ...o, id, children: [] });
	  } else {
	    let parentIndex = lt2.findIndex((el) => el.mod_name === o.parent);
	    if (parentIndex !== -1) {
	      lt2[parentIndex].children.push({...o, id});
	    } else {
	      lt2.push({
	        ...o,
	        // path: '/' + o.parent + o.mod_name + o.auth_id,
	        mod_name: o.parent,
	        children: [{...o, id}],
	        id
	      });
	    }
	  }
	}
	console.log('lt======', lt2);
	
	return lt2.sort((a, b) => a.parent_sort - b.parent_sort);

    // return lt;
  });

  onUpdated(() => {
    handleButtonClick(0)
  });
</script>
<style lang="less">
  .tac {
    .el-card__body {
      padding: 0 !important;
    }
  }
</style>
<style lang="less" scoped>
  .tac {
    width: 100%;
    height: 100%;
    background: #545c64;
    border-right: #fff;

    .el-menu-vertical-demo {
      font-size: 14px;

      .el-menu-item {
        font-size: 14px;
      }

      .el-sub-menu {
        .el-sub-menu__title {
          font-size: 14px;
        }
      }
    }
  }

  .side {
    height: 100%;
    background: #545c64;
    color: #fff;
  }

  .active {
    color: #409eff !important;
  }

  .sactive {
    color: #fdfcfb !important;
  }

  .side::-webkit-scrollbar {
    display: none;
  }

  .el-card.userInfo {
    height: 80px;
    background: #545c64;
    border-radius: 0;
    border-color: #545c64;
    border-bottom-color: #fff;
    border-right-color: #fff;

    .text {
      height: 40px;
      line-height: 40px;
      padding-left: 10px;
      border-bottom: 1px solid #fff;
      color: #fff;
      display: grid;
      align-content: center;
      /* 垂直居中 */
    }

    .sign_out {
      cursor: pointer;
    }
  }
</style>
